package com.v2.k11;


import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 测试@Qualifier
 * <bean>中的property赋值必须要有set方法
 */
public class Test {

	public static void main(String[] args) {

		ClassPathXmlApplicationContext applicationContext =
				new ClassPathXmlApplicationContext("spring-k11.xml");

//		User user = (User)applicationContext.getBean("user0");
//		System.out.println(user);

		UserService userService = (UserService) applicationContext.getBean("userService1");
		System.out.println(userService);
		userService.outUserName();
	}

}
